CC=g++

SRCS=main.cpp Thread.cpp Broker.cpp Publisher.cpp Subscriber.cpp fsk.msg.messages.pb.cc
OBJS=$(subst .cpp,.o,$(SRCS))
INCLUDES += -I.
LIBS += -lpthread -lrt -lzmq -lprotobuf -lprotobuf-lite  -lprotoc

.cpp.o:
	${CC} -c $<

main: msgs ${OBJS}
	${CC} ${CFLAGS} -o $@ ${OBJS} ${LIBS}

msgs:
	${SH} protoc --cpp_out=. --proto_path=.. ../fsk.msg.messages.proto

clean:
	${RM} ${OBJS} main *.pb.*

